#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "Person.h"
#include "Student.h"
#include "Teacher.h"

using namespace std;

TEST(Teacher, introduce_with_not_teaching_student)
{
    Klass klass(2);
    Teacher tom("1", "Tom", 21, nullptr);
    Student jerry("1", "Jerry", 18, klass);
    string actual = tom.IntroduceWith(jerry);

    EXPECT_THAT(actual, ::testing::Eq("My name is Tom. I am 21 years old. I am a Teacher. I don't teach Jerry."));
}

TEST(Teacher, introduce_with_teaching_student)
{
    Klass klass(2);
    Teacher tom("1", "Tom", 21, &klass);
    Student jerry("2", "Jerry", 18, klass);
    string actual = tom.IntroduceWith(jerry);

    EXPECT_THAT(actual, ::testing::Eq("My name is Tom. I am 21 years old. I am a Teacher. I teach Jerry."));
}